package com.pai4j.pgc.dao.community;
import com.pai4j.pgc.entity.community.UserStudyHistoryEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface IUserStudyHistoryDAO extends JpaSpecificationExecutor<UserStudyHistoryEntity>,
                                              JpaRepository<UserStudyHistoryEntity, Long> {


    UserStudyHistoryEntity findAllByUserIdAndResourceTypeAndResourceId(String userId, String resourceType, Long resourceId);

    List<UserStudyHistoryEntity> findAllByUserId(String userId);
}
